package com.usian.admin.controller;

import com.usian.admin.service.LoginService;
import com.usian.apis.admin.LoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class LoginController implements LoginControllerApi {
    @Autowired
    private LoginService loginService;

    /**
     * 袁浩 2022-6-23
     * 后台管理系统登录
     * name:yh
     * password:yh360204819
     * @param dto
     * @return
     */
    @PostMapping("/in")
    @Override
    public ResponseResult login(AdUserDto dto) {
        return loginService.login(dto);
    }
}
